//package project.controller;
//
//
//import org.json.JSONObject;
//import project.dao.ProjectDao;
//import project.entity.Project;
//
//import javax.servlet.ServletException;
//import javax.servlet.http.HttpServlet;
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//import java.io.IOException;
//import java.util.List;
//
//public class MemProjectListServlet extends HttpServlet {
//    private final ProjectDao projectDao = new ProjectDao();
//    private static final long serialVersionUID = 1;
//
//    public MemProjectListServlet() {
//        super();
//    }
//
//    protected void doGet(HttpServletRequest request, HttpServletResponse response)
//            throws IOException, ServletException {
//        doPost(request, response);
//    }
//
//    protected void doPost(HttpServletRequest request, HttpServletResponse response)
//            throws IOException, ServletException {
//        System.out.println("进入了MemProjectListServlet");
//        request.setCharacterEncoding("utf-8");
//        response.setContentType("text/html;charset=utf-8");
//        //这里看前端是否传入参数，若没有则查询全部用户，否则进行条件查询
//        int page =Integer.parseInt(request.getParameter("page"));
//        int limit = Integer.parseInt(request.getParameter("limit"));
//        String projectName = request.getParameter("projectName");
//
//        List<Project> listProject = projectDao.memProjectList(projectName, page, limit);
//        JSONObject jsonObject = new JSONObject();
//        jsonObject.put("count",projectDao.queryMemAllProjects());
//        jsonObject.put("data", listProject);
//        //这里状态码需要返回0，因为是layui数据表格模板要求
//        jsonObject.put("code","0");
//        System.out.println(jsonObject.toString());
//        response.getWriter().write(jsonObject.toString());
//    }
//}
